﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.EventSystems;

public class UIEventListener : MonoBehaviour, IPointerClickHandler
{
    //申明一个代理类型
    public delegate void UIEventProxy(GameObject go);

    //申明一个具体代理方法
    public event UIEventProxy OnClick;
    public void OnPointerClick(PointerEventData eventData)
    {
        if(OnClick!=null)
        {
            OnClick(this.gameObject);
        }
    }
}
